package demo1;

public class Test {
    public static void main(String[] args) {
        //test1();
        //test2();
        test3();
    }
    public static void test1() {
        OutClass.InnerClass.innertest2();
        System.out.println("--------------");
        OutClass outClass = new OutClass();
        //实例化 实例内部类的对象；需要外部类对象进行引用outClass.new InnerClass()
        OutClass.InnerClass innerClass = outClass.new InnerClass();
        //OutClass.InnerClass innerClass = new OutClass().new InnerClass();
        innerClass.innertest1();
    }
    public static void test2() {
        OuterClass.InnerClass innerClass = new OuterClass.InnerClass();
        innerClass.innertest1();
    }
    public static void test3() {
        Out out = new Out();
        out.test();
    }
}
